#include <stdio.h>

int main(int argc, char *argv[]) {

    int n = 0,flag = 1;
    scanf("%d", &n);
    for (size_t i = 2; i < n; i++)
    {
        for (size_t z = 2; z < i; z++)
        {
            if(i%z==0){
                flag = 0;
            }
        }

        if(flag){
            printf("%lld\n", i);
        }
        flag = 1;
    }
    

    return 0;
}